<%@ page contentType="text/html; charset=utf-8" language="java" import="java.util.*" import="com.j2ee.ex.message.pojo" errorPage="" %>
<%@ page import="com.j2ee.ex.message.pojo.LeaveTable" %>
<%@ page import="com.j2ee.ex.user.pojo.User" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>留言板信息</title>
</head>

<body bgcolor="#E3E3E3">
	<form action="LeaveMessage.jsp" method="post">
    <table border="1">
    	<caption>所有留言信息</caption>
        <tr><th>留言人姓名</th><th>留言时间</th>
        	<th>留言标题</th><th>留言内容</th>
         </tr>
         <%
		 	ArrayList al=(ArrayList)session.getAttribute("al");
			Iterator iter=al.iterator();
			while(iter.hasNext()){
				LeaveTable lt=(LeaveTable)iter.next();
		 %>
		 	<tr><td><%=new User().getUsername() %></td>
		 	<td><%= lt.getDate().toString() %></td>
		 	<td><%=lt.getTitle() %></td>
		 	<td><%=lt.getContent() %></td></tr>
		 <%
		 	}
		  %>
		  </table>
		  <input type="submit" value="留言"/>
		  </form>
</body>
</html>
